package com.zl.tby.core.base.enums;

import org.noear.wood.utils.StringUtils;

/**
 * 附件类型
 * @author changpeng
 * @version 1.0
 * @since 2024/8/14 9:40
 */
public enum TbyFileTypeEnum {
    VIDEO("视频"),
    IMAGE("图片");
    private String value;
    TbyFileTypeEnum(String value) {
        this.value = value;
    }

    public static String getValueByCode(String code) {
        if (StringUtils.isEmpty(code)) {
            return "";
        }
        TbyFileTypeEnum[] array = values();
        for (TbyFileTypeEnum e : array) {
            if (e.toString().equals(code)) {
                return e.getValue();
            }
        }
        return "";
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
